function request(params) {
  return new Promise((resolve,reject)=>{
    wx.showLoading({
      title: '正在加载中',
    })
    wx.request({
      ...params,
      url:"http://localhost:5000"+params.url,
      success:(res)=>{
        resolve(res.data)
      },
      fail:(err)=>{
        reject(err)
      },
      complete:()=>{
        wx.hideLoading({
          success: (res) => {},
        })        
      }
    })
  })
}

export default request